package a.j;

import a.c.ab;
import a.c.cb;
import a.c.d;
import a.c.u;

import java.awt.event.MouseEvent;
import java.awt.geom.Point2D;
import java.awt.geom.Point2D.Double;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.*;

public class cg
  extends gf
{
  private tb m;
  private static final double G = 3.0D;
  private boolean H = true;
  private boolean I = true;
  private List J = new ArrayList(3);
  private z K;
  private boolean L = true;
  private boolean M = true;
  private boolean N = true;
  private a.d.w O;
  private e_ P = new e_();
  private boolean Q;
  private double R;
  private double S;
  private u T;
  private PropertyChangeListener U = new PropertyChangeListener()
  {
    public void propertyChange(PropertyChangeEvent paramAnonymousPropertyChangeEvent)
    {
      boolean bool = ld.E;
      if (!bool) {
        if ((cg.this.T != null) && ((bool) || ((paramAnonymousPropertyChangeEvent.getOldValue() instanceof g))))
        {
          ((g)paramAnonymousPropertyChangeEvent.getOldValue()).b(cg.this.T);
          cg.this.T = null;
        }
      }
      cg.this.b();
    }
  };
  private int V = 2;
  public static boolean W;
  
  public boolean v()
  {
    return this.Q;
  }
  
  public void g(boolean paramBoolean)
  {
    this.Q = paramBoolean;
  }
  
  public boolean w()
  {
    return this.L;
  }
  
  public void h(boolean paramBoolean)
  {
    this.L = paramBoolean;
  }
  
  public boolean x()
  {
    return this.M;
  }
  
  public void i(boolean paramBoolean)
  {
    this.M = paramBoolean;
  }
  
  public int y()
  {
    return this.V;
  }
  
  public void d(int paramInt)
  {
    this.V = paramInt;
  }
  
  protected boolean c(MouseEvent paramMouseEvent)
  {
    boolean bool = ld.E;
    if ((bool) || (paramMouseEvent != null)) {
      if (bool) {}
    }
    return (paramMouseEvent.getModifiers() & y()) != 0;
  }
  
  public z z()
  {
    if (!ld.E) {
      if (this.K == null) {
        this.K = B();
      }
    }
    return this.K;
  }
  
  public void a(z paramz)
  {
    if (!ld.E) {
      if (this.K != null) {
        this.K.g();
      }
    }
    this.K = paramz;
  }
  
  public boolean A()
  {
    return this.N;
  }
  
  public void j(boolean paramBoolean)
  {
    this.N = paramBoolean;
  }
  
  protected z B()
  {
    z localz = new z(this.i);
    localz.e(false);
    localz.h(true);
    localz.b(false);
    localz.c(true);
    localz.f(false);
    localz.a(false);
    return localz;
  }
  
  public boolean C()
  {
    return this.I;
  }
  
  public void k(boolean paramBoolean)
  {
    this.I = paramBoolean;
  }
  
  public boolean D()
  {
    return this.H;
  }
  
  public void l(boolean paramBoolean)
  {
    this.H = paramBoolean;
  }
  
  public void mousePressedLeft(double paramDouble1, double paramDouble2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    this.R = paramDouble1;
    this.S = paramDouble2;
    this.O = new a.d.w(paramDouble1, paramDouble2);
    sc localsc = a(paramDouble1, paramDouble2);
    this.m = null;
    eb localeb = localsc.n();
    if (!bool2)
    {
      if (A())
      {
        if (bool2) {
          break label98;
        }
        if (z() != null) {
          z().a(this.i);
        }
      }
      this.J.clear();
    }
    label98:
    if (!bool2)
    {
      if (this.L)
      {
        localObject1 = k().U();
        do
        {
          if (!((fb)localObject1).e()) {
            break;
          }
          ((fb)localObject1).a().a(false);
          ((fb)localObject1).f();
          if ((!bool2) && (bool1)) {
            break label250;
          }
        } while (!bool1);
      }
      if (bool2) {
        break label250;
      }
      if (bool2) {}
    }
    else
    {
      if (this.M)
      {
        localObject1 = k().R();
        do
        {
          if (!((a.c.w)localObject1).e()) {
            break;
          }
          k().a(((a.c.w)localObject1).d(), false);
          ((a.c.w)localObject1).f();
          if ((!bool2) && (bool1)) {
            break label250;
          }
        } while (!bool1);
      }
      if (bool2) {
        break label250;
      }
    }
    this.P = new e_();
    label250:
    Object localObject1 = null;
    if (!bool2)
    {
      if (localeb != null) {
        k().a(new ab(localeb.a()).l());
      }
    }
    else
    {
      a(this.P, localObject1 = k().t(localeb.a()), localeb, this.J);
      break label380;
    }
    Object localObject2 = localsc.o();
    if (!bool2)
    {
      if (localObject2 != null) {
        k().a(new ab((d)localObject2).l());
      }
    }
    else {
      a(this.P, localObject1 = k().t((d)localObject2), paramDouble1, paramDouble2, this.J);
    }
    label380:
    if (!bool2) {
      if (this.J.isEmpty())
      {
        this.m = null;
        g();
        if (!bool2) {
          if (!bool1) {
            return;
          }
        }
      }
      else
      {
        this.m = ((tb)localObject1);
      }
    }
    if (!bool2) {
      if (z() != null)
      {
        if (bool2) {
          break label888;
        }
        if (A())
        {
          z().a(this.i);
          localObject2 = new HashSet();
          HashSet localHashSet = new HashSet();
          Iterator localIterator = this.J.iterator();
          label576:
          label584:
          do
          {
            do
            {
              do
              {
                if (!localIterator.hasNext()) {
                  break;
                }
                localObject3 = (z.t_)localIterator.next();
                if (!bool2) {
                  if ((((z.t_)localObject3).a() instanceof z.r_))
                  {
                    localHashSet.add(((z.t_)localObject3).a());
                    if (bool2) {
                      break label584;
                    }
                    if (!bool1) {
                      break label576;
                    }
                  }
                }
                if (!bool2) {
                  if ((((z.t_)localObject3).a() instanceof z.s_)) {
                    ((Set)localObject2).add(((z.t_)localObject3).a());
                  }
                }
                if (!bool2) {
                  if ((((z.t_)localObject3).b() instanceof z.r_)) {
                    localHashSet.add(((z.t_)localObject3).b());
                  }
                }
              } while ((!bool2) && ((!bool1) || (!(((z.t_)localObject3).b() instanceof z.s_))));
              ((Set)localObject2).add(((z.t_)localObject3).b());
              if ((bool2) || (bool2)) {
                break label687;
              }
              if (bool1) {
                break label686;
              }
            } while (bool2);
          } while (!bool1);
          z().a(this.O, Collections.EMPTY_SET, localHashSet, (Collection)localObject2, q.a(null));
          label686:
          label687:
          int i = 1;
          Object localObject3 = this.J.iterator();
          do
          {
            do
            {
              byte b;
              f_ localf_;
              do
              {
                Object localObject4;
                do
                {
                  if (!((Iterator)localObject3).hasNext()) {
                    break;
                  }
                  z.t_ localt_ = (z.t_)((Iterator)localObject3).next();
                  z().a(localt_);
                  b = a(localt_);
                  z.q_ localq_ = localt_.b();
                  if (!bool2) {
                    if ((localq_ instanceof f_))
                    {
                      localObject4 = (f_)localq_;
                      if (bool2) {
                        continue;
                      }
                      if (((f_)localObject4).f())
                      {
                        z().a(a((f_)localObject4, b));
                        i = 0;
                      }
                    }
                  }
                  localObject4 = localt_.a();
                } while (!(localObject4 instanceof f_));
                localf_ = (f_)localObject4;
                if ((bool2) || (bool1)) {
                  break label866;
                }
              } while (!localf_.f());
              z().a(a(localf_, b));
              i = 0;
            } while (bool2);
          } while (!bool1);
          if (i != 0) {
            label866:
            z().a(new ve(1.7976931348623157E+308D)
            {
              public byte a(a.d.w paramAnonymousw, Point2D.Double paramAnonymousDouble, byte paramAnonymousByte)
              {
                boolean bool = ld.E;
                double d1 = paramAnonymousDouble.x;
                double d2 = paramAnonymousDouble.y;
                cg.this.P.a(paramAnonymousDouble);
                if (!bool) {}
                if (!bool) {}
                return (byte)((d1 != paramAnonymousDouble.x ? 1 : 0) | (d2 != paramAnonymousDouble.y ? 2 : 0) | paramAnonymousByte);
              }
              
              public boolean a(a.d.w paramAnonymousw1, a.d.w paramAnonymousw2, byte paramAnonymousByte)
              {
                return false;
              }
            });
          }
        }
      }
    }
    label888:
    if (!bool2)
    {
      if (this.T == null)
      {
        this.T = new u()
        {
          public void a(cb paramAnonymouscb)
          {
            if ((ld.E) || ((paramAnonymouscb.a() == 5) && (paramAnonymouscb.b().equals(cg.this.m.i())))) {
              cg.this.F();
            }
          }
        };
        k().a(this.T);
      }
      this.i.addPropertyChangeListener("Graph2D", this.U);
    }
    a(true);
  }
  
  public void b()
  {
    if ((ld.E) || (a())) {
      mouseReleasedLeft(this.R, this.S);
    }
  }
  
  private void F()
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (z() != null)
      {
        if (bool) {
          break label53;
        }
        if (A()) {
          z().g();
        }
      }
      a(false);
      this.m = null;
      this.J.clear();
    }
    label53:
    g();
  }
  
  public void g()
  {
    if (!ld.E)
    {
      if (this.T != null)
      {
        k().b(this.T);
        this.T = null;
      }
      this.i.removePropertyChangeListener("Graph2D", this.U);
    }
    super.g();
  }
  
  private ve a(f_ paramf_, byte paramByte)
  {
    new ve(1.7976931348623157E+308D)
    {
      private final cg.f_ val$info;
      private final byte val$type;
      
      public boolean a(a.d.w paramAnonymousw1, a.d.w paramAnonymousw2, byte paramAnonymousByte)
      {
        return false;
      }
      
      public byte a(a.d.w paramAnonymousw, Point2D.Double paramAnonymousDouble, byte paramAnonymousByte)
      {
        boolean bool = ld.E;
        double d1 = paramAnonymousDouble.x;
        double d2 = paramAnonymousDouble.y;
        double d3 = d1 - cg.this.O.a;
        double d4 = d2 - cg.this.O.b;
        a.d.w localw1 = this.val$info.c(d3, d4);
        cg.h_ localh_ = new cg.h_(cg.this.O, d1, d2);
        a.d.w localw2 = this.val$info.a();
        if (!bool) {
          switch (this.val$type)
          {
          case 0: 
            paramAnonymousDouble.setLocation(d1, localh_.b.a(localw1.b() - localw2.b()));
            if (!bool) {
              if (!ld.D) {
                break;
              }
            }
            break;
          case 1: 
            paramAnonymousDouble.setLocation(localh_.a.a(localw1.a() - localw2.a()), d2);
          }
        }
        if (!bool) {
          if (d3 != localw1.a())
          {
            if (!bool) {
              if (d4 != localw1.b()) {
                return 3;
              }
            }
            return 1;
          }
        }
        if (!bool) {
          if (d4 != localw1.b()) {
            return 2;
          }
        }
        return 0;
      }
    };
  }
  
  protected tb G()
  {
    return this.m;
  }
  
  protected eb a(e_ parame_, tb paramtb, eb parameb, Collection paramCollection)
  {
    boolean bool6 = ld.E;
    boolean bool5 = ld.D;
    double d1 = this.i.f(this.s.getX());
    double d2 = this.i.g(this.s.getY());
    boolean bool1 = a(paramtb);
    Object localObject1 = paramtb.p();
    double d3 = 1.7976931348623157E+308D;
    int i = 0;
    Object localObject2;
    do
    {
      if (i >= paramtb.n()) {
        break;
      }
      localObject2 = paramtb.b(i);
      double d4 = a.d.w.a(d1, d2, ((eb)localObject2).b(), ((eb)localObject2).c());
      if (bool5) {
        break label138;
      }
      if (d4 < d3)
      {
        localObject1 = localObject2;
        d3 = d4;
      }
      i++;
    } while (!bool5);
    if (!bool6)
    {
      if (d3 < 10.0D)
      {
        label138:
        if (bool6) {
          break label286;
        }
        parameb = (eb)localObject1;
        if (!bool5) {}
      }
      else
      {
        i = paramtb.e(d1, d2);
      }
    }
    else if ((bool6) || (i > 0)) {
      if (i > paramtb.n() - 1)
      {
        localObject2 = a(paramtb, paramtb.n() - 1);
        parameb = paramtb.c(((a.d.w)localObject2).a(), ((a.d.w)localObject2).b());
        if (bool6) {
          break label286;
        }
        paramtb.c(paramtb.q().b(), paramtb.q().c());
        if (!bool5) {}
      }
      else
      {
        localObject2 = paramtb.b(i);
        parameb = paramtb.a(((eb)localObject2).b(), ((eb)localObject2).c(), (eb)localObject2, 1);
        paramtb.a(((eb)localObject2).b(), ((eb)localObject2).c(), (eb)localObject2, 1);
      }
    }
    label286:
    if (!bool6) {
      if ((parameb != null) && (this.H)) {
        parameb.a(true);
      }
    }
    if (!bool6)
    {
      if (parameb != null)
      {
        i = a(paramtb, parameb);
        if (!bool6) {}
        int j = i > 0 ? 1 : 0;
        if (!bool6) {}
        int k = i < paramtb.n() - 1 ? 1 : 0;
        if (!bool6) {}
        boolean bool2 = i % 2 == 1;
        if (!bool6) {}
        boolean bool3 = bool1 == bool2;
        if (!bool6) {}
        boolean bool4 = !bool3;
        z.r_ localr_1 = new z.r_(parameb, new a.d.w(parameb.b(), parameb.c()), (byte)3);
        Object localObject3;
        z.r_ localr_2;
        if (j != 0)
        {
          localObject3 = paramtb.b(i - 1);
          localr_2 = new z.r_((eb)localObject3, new a.d.w(((eb)localObject3).b(), ((eb)localObject3).c()), (byte)(bool3 ? 1 : 2));
          paramCollection.add(new z.t_(localr_1, localr_2));
          if (bool6) {
            break label614;
          }
          if (!bool5) {}
        }
        else
        {
          localObject3 = new f_(jd.b(paramtb), paramtb.k(), a(paramtb, 0), (byte)(bool3 ? 1 : 2));
          if (!bool6) {}
          a(parame_, d1, d2, paramtb.h(), paramtb.k(), !bool3, bool3);
          paramCollection.add(new z.t_(localr_1, (z.q_)localObject3));
        }
        if (k != 0)
        {
          label614:
          localObject3 = paramtb.b(i + 1);
          localr_2 = new z.r_((eb)localObject3, new a.d.w(((eb)localObject3).b(), ((eb)localObject3).c()), (byte)(bool4 ? 1 : 2));
          paramCollection.add(new z.t_(localr_1, localr_2));
          if (bool6) {
            return parameb;
          }
          if (!bool5) {}
        }
        else
        {
          localObject3 = new f_(jd.d(paramtb), paramtb.l(), a(paramtb, paramtb.n() + 1), (byte)(bool4 ? 1 : 2));
          if (!bool6) {}
          a(parame_, d1, d2, paramtb.g(), paramtb.l(), !bool4, bool4);
          paramCollection.add(new z.t_(localr_1, (z.q_)localObject3));
        }
      }
      k().gb();
    }
    return parameb;
  }
  
  protected void a(e_ parame_, tb paramtb, double paramDouble1, double paramDouble2, Collection paramCollection)
  {
    boolean bool5 = ld.E;
    boolean bool4 = ld.D;
    boolean bool1 = a(paramtb);
    if (!bool5) {
      if (paramtb.n() == 0)
      {
        a(parame_, paramtb, paramDouble1, paramDouble2, paramCollection, bool1);
        return;
      }
    }
    int i = Math.max(1, paramtb.e(paramDouble1, paramDouble2));
    paramDouble1 = a(paramDouble1);
    paramDouble2 = b(paramDouble2);
    if (!bool5) {}
    boolean bool2 = i % 2 == 0;
    if (!bool5) {}
    boolean bool3 = bool1 == bool2;
    if (!bool5) {}
    byte b = bool3 ? 1 : 2;
    Object localObject3;
    Object localObject2;
    Object localObject1;
    Object localObject4;
    if ((bool5) || (i >= 1))
    {
      if ((bool5) || (i > paramtb.n()))
      {
        if ((bool5) || ((this.I) || (b(this.s))))
        {
          localObject3 = a(paramtb, paramtb.n() + 2);
          if (!bool3)
          {
            localObject2 = paramtb.c(paramDouble1, ((a.d.w)localObject3).b);
            b = 3;
            localeb = paramtb.c(paramDouble1, ((a.d.w)localObject3).b);
            localObject1 = paramtb.b(a(paramtb, (eb)localObject2) - 1);
            if (!bool5) {
              if (!bool4) {
                break label887;
              }
            }
          }
          else
          {
            localObject2 = paramtb.c(((a.d.w)localObject3).a, paramDouble2);
            b = 3;
            localeb = paramtb.c(((a.d.w)localObject3).a, paramDouble2);
            localObject1 = paramtb.b(a(paramtb, (eb)localObject2) - 1);
          }
          if (!bool4) {
            break label887;
          }
        }
        localObject3 = new z.r_(paramtb.q(), a(paramtb, paramtb.n()), (byte)(bool3 ? 1 : 2));
        localObject4 = new f_(jd.d(paramtb), paramtb.l(), a(paramtb, paramtb.n() + 1), (byte)(bool3 ? 1 : 2));
        if (!bool5) {}
        a(parame_, paramDouble1, paramDouble2, paramtb.g(), paramtb.l(), !bool3, bool3);
        paramCollection.add(new z.t_((z.q_)localObject3, (z.q_)localObject4));
        localObject2 = null;
        localObject1 = null;
        localeb = null;
        if (!bool4) {
          break label887;
        }
      }
      localObject3 = paramtb.b(i - 1);
      if (!bool5) {
        if (!b(this.s))
        {
          if (bool5) {
            break label722;
          }
          if (i != 1) {
            break label719;
          }
          if (bool5) {
            break label721;
          }
          if (!this.I) {
            break label719;
          }
        }
      }
      if (i == 1)
      {
        localObject4 = a(paramtb, i);
        if (!bool3)
        {
          localeb = paramtb.a(paramDouble1, ((a.d.w)localObject4).b, (eb)localObject3, 1);
          b = 3;
          localObject2 = paramtb.a(paramDouble1, ((a.d.w)localObject4).b, (eb)localObject3, 1);
          localObject1 = localObject3;
          if (!bool5) {
            if (!bool4) {
              break label887;
            }
          }
        }
        else
        {
          localeb = paramtb.a(((a.d.w)localObject4).a, paramDouble2, (eb)localObject3, 1);
          b = 3;
          localObject2 = paramtb.a(((a.d.w)localObject4).a, paramDouble2, (eb)localObject3, 1);
          localObject1 = localObject3;
        }
        if (!bool5) {
          if (!bool4) {
            break label887;
          }
        }
      }
      else
      {
        localObject4 = a(paramtb, i);
      }
      if (!bool3)
      {
        localObject2 = paramtb.a(paramDouble1, ((a.d.w)localObject4).b, (eb)localObject3, 1);
        b = 3;
        localeb = paramtb.a(paramDouble1, ((a.d.w)localObject4).b, (eb)localObject3, 1);
        localObject1 = paramtb.b(a(paramtb, (eb)localObject2) - 1);
        if (!bool5) {
          if (!bool4) {
            break label887;
          }
        }
      }
      else
      {
        localObject2 = paramtb.a(((a.d.w)localObject4).a, paramDouble2, (eb)localObject3, 1);
        b = 3;
        localeb = paramtb.a(((a.d.w)localObject4).a, paramDouble2, (eb)localObject3, 1);
        localObject1 = paramtb.b(a(paramtb, (eb)localObject2) - 1);
      }
      if ((!bool5) && (!bool4)) {
        break label887;
      }
      label719:
      label721:
      if (i > 1)
      {
        label722:
        localObject2 = localObject3;
        localObject1 = paramtb.b(i - 2);
        localeb = null;
        if (!bool4) {
          break label887;
        }
      }
      localObject4 = new z.r_(paramtb.p(), a(paramtb, 1), (byte)(bool3 ? 1 : 2));
      if (!bool5) {}
      a(parame_, paramDouble1, paramDouble2, paramtb.h(), paramtb.k(), !bool3, bool3);
      f_ localf_ = new f_(jd.b(paramtb), paramtb.k(), a(paramtb, 0), (byte)(bool3 ? 1 : 2));
      paramCollection.add(new z.t_((z.q_)localObject4, localf_));
      localObject2 = null;
      localObject1 = null;
      localeb = null;
      if (!bool5) {
        if (!bool4) {
          break label887;
        }
      }
    }
    else
    {
      localObject1 = null;
      localObject2 = null;
    }
    eb localeb = null;
    label887:
    if (localObject2 != null)
    {
      localObject3 = new z.r_((eb)localObject2, new a.d.w(((eb)localObject2).b(), ((eb)localObject2).c()), b);
      if (!bool5) {
        if (localObject1 != null)
        {
          localObject4 = new z.r_((eb)localObject1, new a.d.w(((eb)localObject1).b(), ((eb)localObject1).c()), (byte)(bool3 ? 1 : 2));
          paramCollection.add(new z.t_((z.q_)localObject3, (z.q_)localObject4));
        }
      }
      if (localeb != null)
      {
        localObject4 = new z.r_(localeb, new a.d.w(localeb.b(), localeb.c()), (byte)(bool3 ? 2 : 1));
        paramCollection.add(new z.t_((z.q_)localObject3, (z.q_)localObject4));
      }
    }
    if (!bool5)
    {
      if ((this.H) && ((bool5) || (!paramCollection.isEmpty())))
      {
        localObject3 = a(paramCollection).iterator();
        do
        {
          if (!((Iterator)localObject3).hasNext()) {
            break;
          }
          localObject4 = (eb)((Iterator)localObject3).next();
          ((eb)localObject4).a(true);
          if ((!bool5) && (bool4)) {
            return;
          }
        } while (!bool4);
      }
      if (bool5) {}
    }
    else
    {
      k().gb();
    }
  }
  
  private void a(e_ parame_, tb paramtb, double paramDouble1, double paramDouble2, Collection paramCollection, boolean paramBoolean)
  {
    boolean bool = ld.E;
    a.d.w localw1 = a(paramtb, 0);
    a.d.w localw2 = a(paramtb, 1);
    double d1 = localw1.a - localw2.a;
    double d2 = localw1.b - localw2.b;
    Object localObject1;
    Object localObject2;
    if (!bool)
    {
      if (!this.I)
      {
        if (bool) {
          break label313;
        }
        if (!b(this.s))
        {
          if (!bool) {
            if (d1 != 0.0D)
            {
              a(parame_, paramDouble1, paramDouble2, paramtb.h(), paramtb.k(), true, false);
              a(parame_, paramDouble1, paramDouble2, paramtb.g(), paramtb.l(), true, false);
              localObject1 = new f_(jd.b(paramtb), paramtb.k(), a(paramtb, 0), (byte)2);
              localObject2 = new f_(jd.d(paramtb), paramtb.l(), a(paramtb, 1), (byte)2);
              paramCollection.add(new z.t_((z.q_)localObject1, (z.q_)localObject2));
              return;
            }
          }
          if (d2 != 0.0D)
          {
            a(parame_, paramDouble1, paramDouble2, paramtb.h(), paramtb.k(), false, true);
            a(parame_, paramDouble1, paramDouble2, paramtb.g(), paramtb.l(), false, true);
            localObject1 = new f_(jd.b(paramtb), paramtb.k(), a(paramtb, 0), (byte)1);
            localObject2 = new f_(jd.d(paramtb), paramtb.l(), a(paramtb, 1), (byte)1);
            paramCollection.add(new z.t_((z.q_)localObject1, (z.q_)localObject2));
            return;
          }
          return;
        }
      }
      if (bool) {
        break label408;
      }
    }
    label313:
    double d3;
    double d4;
    if (Math.abs(d1) > Math.abs(d2))
    {
      d3 = (localw1.a + paramDouble1) * 0.5D;
      d4 = (localw2.a + paramDouble1) * 0.5D;
      paramtb.c(d3, localw1.b);
      localObject1 = paramtb.c(d3, paramDouble2);
      localObject2 = paramtb.c(d4, paramDouble2);
      paramtb.c(d4, localw2.b);
      if (!bool) {
        if (!ld.D) {
          break label467;
        }
      }
    }
    else
    {
      label408:
      d3 = (localw1.b + paramDouble2) * 0.5D;
      d4 = (localw2.b + paramDouble2) * 0.5D;
      paramtb.c(localw1.a, d3);
      localObject1 = paramtb.c(paramDouble1, d3);
      localObject2 = paramtb.c(paramDouble1, d4);
    }
    paramtb.c(localw2.a, d4);
    label467:
    z.r_ localr_1 = new z.r_((eb)localObject1, new a.d.w(((eb)localObject1).b(), ((eb)localObject1).c()), (byte)(paramBoolean ? 2 : 1));
    z.r_ localr_2 = new z.r_((eb)localObject2, new a.d.w(((eb)localObject2).b(), ((eb)localObject2).c()), (byte)(paramBoolean ? 2 : 1));
    paramCollection.add(new z.t_(localr_1, localr_2));
    if (!bool) {
      if (this.H)
      {
        ((eb)localObject1).a(true);
        ((eb)localObject2).a(true);
      }
    }
    k().gb();
  }
  
  private void a(e_ parame_, double paramDouble1, double paramDouble2, ld paramld, zd paramzd, boolean paramBoolean1, boolean paramBoolean2)
  {
    double d;
    if (!ld.E) {
      if (paramBoolean1)
      {
        d = paramDouble2 - paramzd.b(paramld);
        parame_.c(Math.max(parame_.c(), paramld.b() + d));
        parame_.d(Math.min(parame_.d(), paramld.b() + paramld.d() + d));
      }
    }
    if (paramBoolean2)
    {
      d = paramDouble1 - paramzd.a(paramld);
      parame_.a(Math.max(parame_.a(), paramld.a() + d));
      parame_.b(Math.min(parame_.b(), paramld.a() + paramld.c() + d));
    }
  }
  
  private Collection a(Collection paramCollection)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    HashSet localHashSet = new HashSet();
    Iterator localIterator = paramCollection.iterator();
    do
    {
      do
      {
        z.t_ localt_;
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          localt_ = (z.t_)localIterator.next();
          if (!bool2) {
            if ((localt_.a() instanceof z.r_)) {
              localHashSet.add(((z.r_)localt_.a()).e());
            }
          }
        } while (!(localt_.b() instanceof z.r_));
        if ((bool2) || (bool1)) {
          break label125;
        }
        localHashSet.add(((z.r_)localt_.b()).e());
      } while (bool2);
    } while (!bool1);
    label125:
    return localHashSet;
  }
  
  private int a(tb paramtb, eb parameb)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    int i = 0;
    do
    {
      do
      {
        if (i >= paramtb.n()) {
          break;
        }
        if (paramtb.b(i) == parameb) {
          return i;
        }
        i++;
      } while (!bool1);
    } while (bool2);
    return -1;
  }
  
  public void mouseDraggedLeft(double paramDouble1, double paramDouble2)
  {
    this.R = paramDouble1;
    this.S = paramDouble2;
    if (!ld.E) {}
    b(paramDouble1, paramDouble2, !c(this.t));
  }
  
  private void b(double paramDouble1, double paramDouble2, boolean paramBoolean)
  {
    boolean bool3 = ld.E;
    boolean bool2 = ld.D;
    if (!bool3)
    {
      if (this.J.isEmpty())
      {
        if (((bool3) || (z() != null)) && ((bool3) || (A()))) {
          z().i();
        }
        return;
      }
      paramDouble1 = a(paramDouble1);
    }
    paramDouble2 = b(paramDouble2);
    Point2D.Double localDouble1 = new Point2D.Double(paramDouble1, paramDouble2);
    this.P.a(localDouble1);
    paramDouble1 = localDouble1.x;
    paramDouble2 = localDouble1.y;
    boolean bool1 = true;
    double d1;
    double d2;
    if (((bool3) || (z() != null)) && ((bool3) || (A())))
    {
      if (!bool3)
      {
        if (paramBoolean)
        {
          a.d.w localw1 = z().b(new a.d.w(paramDouble1, paramDouble2));
          paramDouble1 = localw1.a;
          paramDouble2 = localw1.b;
          Point2D.Double localDouble2 = new Point2D.Double(paramDouble1, paramDouble2);
          this.P.a(localDouble2);
          paramDouble1 = localDouble2.x;
          paramDouble2 = localDouble2.y;
          if (bool3) {
            break label936;
          }
          if (!bool2) {}
        }
        else
        {
          z().i();
        }
      }
      else
      {
        if (bool3) {
          break label936;
        }
        if (!bool2) {}
      }
    }
    else
    {
      d1 = paramDouble1 - this.O.a;
      d2 = paramDouble2 - this.O.b;
      h_ localh_ = new h_(this.O, paramDouble1, paramDouble2);
      Iterator localIterator = this.J.iterator();
      while (localIterator.hasNext())
      {
        z.t_ localt_ = (z.t_)localIterator.next();
        byte b = a(localt_);
        a.d.w localw2 = null;
        z.q_ localq_1 = localt_.b();
        if ((bool3) || (((localq_1 instanceof f_)) && ((bool3) || (((f_)localq_1).f()))))
        {
          localw2 = ((f_)localq_1).c(d1, d2);
          localw3 = a(localw2, localq_1.a(), b);
          if (!bool3)
          {
            if (!this.P.a(localw3.a(), localw3.b()))
            {
              if (bool3) {
                break label911;
              }
              localh_.c();
            }
          }
          else {
            if (!bool2) {
              break;
            }
          }
        }
        a.d.w localw3 = null;
        z.q_ localq_2 = localt_.a();
        a.d.w localw4;
        if ((bool3) || (((localq_2 instanceof f_)) && ((bool3) || (((f_)localq_2).f()))))
        {
          localw3 = ((f_)localq_2).c(d1, d2);
          if (bool3) {
            break label524;
          }
          localw4 = a(localw3, localq_2.a(), b);
          if (!this.P.a(localw4.a(), localw4.b()))
          {
            if (bool3) {
              break label911;
            }
            localh_.c();
            if (!bool2) {
              break;
            }
          }
        }
        label524:
        if (!bool3) {
          if (localw2 != null)
          {
            if (!bool3) {
              if (localw3 != null)
              {
                if (!bool3)
                {
                  a.d.w localw5;
                  switch (b)
                  {
                  case 0: 
                    if (!bool3)
                    {
                      if (!b(localw2.b(), localw3.b()))
                      {
                        if (bool3) {
                          break label911;
                        }
                        localh_.c();
                      }
                    }
                    else {
                      if (!bool2) {
                        break label909;
                      }
                    }
                    localw4 = localq_1.a();
                    localw5 = localq_2.a();
                    localh_.b.c((localw2.b() - localw4.b() + localw3.b() - localw5.b()) * 0.5D);
                    if (!bool3) {
                      if (localh_.a()) {
                        break;
                      }
                    }
                    break;
                  case 1: 
                    if (!bool3)
                    {
                      if (!b(localw2.a(), localw3.a()))
                      {
                        if (bool3) {
                          break label911;
                        }
                        localh_.c();
                      }
                    }
                    else {
                      if (!bool2) {
                        break label909;
                      }
                    }
                    localw4 = localq_1.a();
                    localw5 = localq_2.a();
                    localh_.a.c((localw2.a() - localw4.a() + localw3.a() - localw5.a()) * 0.5D);
                    if ((!bool3) && (!localh_.a())) {
                      break label909;
                    }
                  }
                }
                if (bool3) {
                  continue;
                }
                if (!bool2) {
                  continue;
                }
              }
            }
            localw4 = localq_1.a();
            localh_.a(localw2.a() - localw4.a(), localw2.b() - localw4.b(), b);
            if (bool3) {
              continue;
            }
            if (localh_.a()) {
              continue;
            }
            break;
          }
        }
        if (localw3 != null)
        {
          localw4 = localq_2.a();
          localh_.a(localw3.a() - localw4.a(), localw3.b() - localw4.b(), b);
          if (bool3) {
            break label927;
          }
          if ((bool3) || (bool2)) {
            break label914;
          }
          if (!localh_.a()) {
            break;
          }
        }
      }
      label909:
      label911:
      label914:
      bool1 = localh_.a();
      paramDouble1 = localh_.a.a();
      label927:
      paramDouble2 = localh_.b.a();
    }
    if (bool1)
    {
      label936:
      d1 = paramDouble1 - this.O.a;
      d2 = paramDouble2 - this.O.b;
      a(d1, d2, this.J);
      k().gb();
    }
  }
  
  private a.d.w a(a.d.w paramw1, a.d.w paramw2, byte paramByte)
  {
    switch (paramByte)
    {
    case 0: 
      return new a.d.w(paramw1.a(), paramw1.b() + this.O.b - paramw2.b());
    case 1: 
      return new a.d.w(paramw1.a() + this.O.a - paramw2.a(), paramw1.b());
    }
    return paramw1;
  }
  
  private boolean b(double paramDouble1, double paramDouble2)
  {
    if (!ld.E) {}
    return Math.abs(paramDouble1 - paramDouble2) * Math.max(1.0D, this.i.M()) <= 0.1D;
  }
  
  private static byte a(z.t_ paramt_)
  {
    boolean bool = ld.E;
    z.q_ localq_1 = paramt_.b();
    z.q_ localq_2 = paramt_.a();
    double d1 = localq_1.a().a - localq_2.a().a;
    double d2 = localq_1.a().b - localq_2.a().b;
    if (!bool) {
      if (d1 == 0.0D)
      {
        if (!bool) {
          if (d2 == 0.0D)
          {
            if (bool) {
              break label93;
            }
            if (localq_1.c() == localq_2.c()) {
              break label89;
            }
          }
        }
        return 1;
      }
    }
    label89:
    label93:
    if (!bool) {
      if (d2 == 0.0D)
      {
        if (!bool) {
          if (d1 == 0.0D)
          {
            if (bool) {
              break label131;
            }
            if (localq_1.d() == localq_2.d()) {
              break label130;
            }
          }
        }
        return 0;
      }
    }
    label130:
    label131:
    return -1;
  }
  
  private void a(double paramDouble1, double paramDouble2, List paramList)
  {
    boolean bool = ld.D;
    int i = 0;
    do
    {
      if (i >= paramList.size()) {
        break;
      }
      z.t_ localt_ = (z.t_)paramList.get(i);
      localt_.a(paramDouble1, paramDouble2);
      i++;
    } while (!bool);
  }
  
  public void mouseReleasedLeft(double paramDouble1, double paramDouble2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    super.mouseReleasedLeft(paramDouble1, paramDouble2);
    if (!bool2) {}
    b(paramDouble1, paramDouble2, !c(this.v));
    if (!bool2) {
      if (z() != null)
      {
        if (bool2) {
          break label75;
        }
        if (A()) {
          z().g();
        }
      }
    }
    label75:
    Iterator localIterator = a(this.J).iterator();
    if (localIterator.hasNext()) {}
    do
    {
      eb localeb = (eb)localIterator.next();
      a(localeb, localeb.b(), localeb.c());
      if ((!bool2) && (bool1)) {
        return;
      }
      if (!bool1) {
        break;
      }
      if (bool2) {
        break label206;
      }
    } while (bool2);
    if (this.m != null)
    {
      d(this.m);
      if (!bool2) {
        if (this.Q) {
          e(this.m);
        }
      }
      this.m = null;
    }
    this.J.clear();
    a(false);
    label206:
    g();
  }
  
  public void mouseReleasedRight(double paramDouble1, double paramDouble2)
  {
    mouseReleasedLeft(paramDouble1, paramDouble2);
  }
  
  private static a.d.w a(tb paramtb, int paramInt)
  {
    g localg = (g)paramtb.i().c();
    if (!ld.E) {
      if (paramInt < 1) {
        return localg.r(paramtb.i());
      }
    }
    if (paramInt > paramtb.n()) {
      return localg.s(paramtb.i());
    }
    eb localeb = paramtb.b(paramInt - 1);
    return new a.d.w(localeb.b(), localeb.c());
  }
  
  public static boolean a(tb paramtb)
  {
    boolean bool3 = ld.E;
    boolean bool2 = ld.D;
    if (!bool3) {
      if (paramtb.r() <= 0) {
        if (!bool3)
        {
          if (paramtb.i() != null) {
            if (bool3) {
              break label56;
            }
          }
        }
        else {
          if (paramtb.i().c() != null) {
            break label51;
          }
        }
      }
    }
    return false;
    label51:
    c(paramtb);
    label56:
    int i = paramtb.n() + 2;
    i = b(paramtb, i);
    if (!bool3) {
      if (paramtb.i().g())
      {
        if (!bool3) {
          if (i == 2)
          {
            localObject1 = a(paramtb, 0);
            localw1 = a(paramtb, 1);
            if (!bool3) {
              if (a((a.d.w)localObject1, localw1)) {
                return true;
              }
            }
            if (!bool3) {
              if (((a.d.w)localObject1).a == localw1.a) {
                return false;
              }
            }
            if (!bool3)
            {
              if (((a.d.w)localObject1).b == localw1.b) {
                return true;
              }
              paramtb.b(((a.d.w)localObject1).a, localw1.b);
            }
            return false;
          }
        }
        if (bool3) {
          break label314;
        }
        if (i == 3)
        {
          localObject1 = a(paramtb, 0);
          localw1 = a(paramtb, 1);
          a.d.w localw2 = a(paramtb, 2);
          double d2 = localw1.a - ((a.d.w)localObject1).a;
          double d3 = localw1.b - ((a.d.w)localObject1).b;
          if (!bool3)
          {
            if (Math.abs(d2) < Math.abs(d3))
            {
              paramtb.b(0).a(((a.d.w)localObject1).a, localw1.b);
              paramtb.c(localw2.a, localw1.b);
              return false;
            }
            paramtb.b(0).a(localw1.a, ((a.d.w)localObject1).b);
            paramtb.c(localw1.a, localw2.b);
          }
          return true;
        }
      }
    }
    label314:
    double d1;
    if (!bool3) {
      if (i > 2)
      {
        localObject1 = a(paramtb, i - 1);
        localw1 = a(paramtb, i - 2);
        d1 = a.d.w.a(localw1, (a.d.w)localObject1);
        do
        {
          if (d1 >= 3.0D) {
            break;
          }
          if (bool2) {
            break label398;
          }
          if (i <= 2) {
            break;
          }
          paramtb.a(paramtb.q());
          i--;
          localw1 = a(paramtb, i - 2);
          d1 = a.d.w.a(localw1, (a.d.w)localObject1);
        } while (!bool2);
      }
    }
    if ((!bool3) && (i > 2))
    {
      label398:
      localObject1 = a(paramtb, 0);
      localw1 = a(paramtb, 1);
      d1 = a.d.w.a(localw1, (a.d.w)localObject1);
      do
      {
        if (d1 >= 3.0D) {
          break;
        }
        if (!bool3)
        {
          if (i <= 2) {
            break;
          }
          paramtb.a(paramtb.p());
          i--;
          localw1 = a(paramtb, 1);
          d1 = a.d.w.a(localw1, (a.d.w)localObject1);
        }
      } while (!bool2);
    }
    Object localObject1 = a(paramtb, 0);
    a.d.w localw1 = a(paramtb, 1);
    a.d.z localz = new a.d.z(localw1, (a.d.w)localObject1);
    if (!bool3) {}
    int j = Math.abs(localz.b()) > Math.abs(localz.a()) ? 1 : 0;
    if (!bool3) {}
    boolean bool1 = j == 0;
    if (!bool3) {
      if (i > 2)
      {
        eb localeb1 = paramtb.p();
        if (!bool3)
        {
          if (j != 0) {
            localeb1.a(((a.d.w)localObject1).a, localeb1.c());
          }
        }
        else
        {
          if (bool3) {
            break label625;
          }
          if (!bool2) {
            break label605;
          }
        }
        localeb1.a(localeb1.b(), ((a.d.w)localObject1).b);
        label605:
        localObject1 = new a.d.w(localeb1.b(), localeb1.c());
        label625:
        if (!bool3) {}
        j = j == 0 ? 1 : 0;
      }
    }
    int k = 1;
    Object localObject2;
    label765:
    do
    {
      if (k >= paramtb.n()) {
        break;
      }
      localObject2 = paramtb.b(k);
      a.d.w localw4 = new a.d.w(((eb)localObject2).b(), ((eb)localObject2).c());
      localz = new a.d.z(localw4, (a.d.w)localObject1);
      if (bool2) {
        break label1038;
      }
      if (localz.b() == 0.0D)
      {
        if (bool3) {
          break label765;
        }
        if (j != 0) {}
      }
      else
      {
        if (bool3) {
          break label790;
        }
        if (localz.a() != 0.0D) {
          break label773;
        }
        if (bool3) {
          break label790;
        }
        if (j != 0) {
          break label773;
        }
      }
      paramtb.a(paramtb.b(k - 1));
      localObject1 = localw4;
      i--;
      k--;
      if (!bool3)
      {
        if (bool2)
        {
          if (!bool3) {}
          if ((Math.abs(localz.b()) > Math.abs(localz.a()) ? 1 : 0) != j)
          {
            eb localeb2 = paramtb.a(0.0D, 0.0D, (eb)localObject2, 1);
            k++;
            i++;
            if (!bool3)
            {
              if (j != 0) {
                localeb2.a(((a.d.w)localObject1).a, ((eb)localObject2).c());
              }
            }
            else
            {
              if (bool3) {
                break label893;
              }
              if (!bool2) {
                break label873;
              }
            }
            localeb2.a(((eb)localObject2).b(), ((a.d.w)localObject1).b);
            localObject1 = new a.d.w(((eb)localObject2).b(), ((eb)localObject2).c());
            if (!bool3) {}
            j = j == 0 ? 1 : 0;
          }
          if (!bool3)
          {
            if (j != 0) {
              ((eb)localObject2).a(((a.d.w)localObject1).a, ((eb)localObject2).c());
            }
          }
          else
          {
            if (bool3) {
              break label976;
            }
            if (!bool2) {
              break label956;
            }
          }
          ((eb)localObject2).a(((eb)localObject2).b(), ((a.d.w)localObject1).b);
          localObject1 = new a.d.w(((eb)localObject2).b(), ((eb)localObject2).c());
          if (!bool3) {}
          j = j == 0 ? 1 : 0;
        }
        k++;
      }
    } while (!bool2);
    label773:
    label790:
    label873:
    label893:
    localObject1 = a(paramtb, i - 2);
    label956:
    label976:
    localw1 = a(paramtb, i - 1);
    localz = new a.d.z(localw1, (a.d.w)localObject1);
    if (!bool3)
    {
      if (localz.b() == 0.0D)
      {
        label1038:
        if (bool3) {
          break label1087;
        }
        if (j != 0) {}
      }
      else
      {
        if (bool3) {
          break label1221;
        }
      }
    }
    else {
      if ((localz.a() != 0.0D) || ((!bool3) && (j != 0)) || ((!bool3) && (i <= 2))) {
        break label1216;
      }
    }
    label1087:
    double d5;
    if (i == 3)
    {
      a.d.w localw3 = a(paramtb, i - 3);
      localObject2 = new a.d.z(localw3, (a.d.w)localObject1);
      d5 = ((a.d.z)localObject2).a() * localz.a() + ((a.d.z)localObject2).b() * localz.b();
      if (bool3) {
        break label1205;
      }
      if (d5 > 0.0D)
      {
        paramtb.c(((a.d.w)localObject1).a(), ((a.d.w)localObject1).b());
        i++;
        if (!bool3) {}
        j = j == 0 ? 1 : 0;
        return bool1;
      }
    }
    paramtb.a(paramtb.q());
    i--;
    localObject1 = a(paramtb, i - 2);
    label1205:
    localz = new a.d.z(localw1, (a.d.w)localObject1);
    label1216:
    label1221:
    double d4 = localz.d();
    if (d4 < 3.0D) {}
    while (bool3)
    {
      if (bool2) {
        break label1321;
      }
      if (paramtb.n() > 0)
      {
        paramtb.a(paramtb.q());
        i--;
        localObject1 = a(paramtb, i - 2);
        localw1 = a(paramtb, i - 1);
        localz = new a.d.z(localw1, (a.d.w)localObject1);
        d4 = localz.d();
        if (!bool3) {}
        j = j == 0 ? 1 : 0;
        if (!bool2) {
          break;
        }
      }
    }
    if (paramtb.n() == 0)
    {
      label1321:
      if (!bool3) {
        if (((a.d.w)localObject1).a != localw1.a)
        {
          if (bool3) {
            break label1469;
          }
          if (((a.d.w)localObject1).b != localw1.b)
          {
            if (!bool3) {
              if (Math.abs(localz.a()) < Math.abs(localz.b()))
              {
                d5 = (((a.d.w)localObject1).b + localw1.b) * 0.5D;
                paramtb.c(((a.d.w)localObject1).a, d5);
                paramtb.c(localw1.a, d5);
                i++;
                return false;
              }
            }
            d5 = (((a.d.w)localObject1).a + localw1.a) * 0.5D;
            paramtb.c(d5, ((a.d.w)localObject1).b);
            paramtb.c(d5, localw1.b);
            i++;
            return true;
          }
        }
      }
      label1469:
      return bool1;
    }
    if (!bool3) {
      if (localz.b() != 0.0D)
      {
        if (bool3) {
          break label1552;
        }
        if (localz.a() != 0.0D)
        {
          if (!bool3)
          {
            if (j == 0) {
              paramtb.q().a(((a.d.w)localObject1).a, localw1.b());
            }
          }
          else
          {
            if (bool3) {
              break label1552;
            }
            if (!bool2) {
              break label1550;
            }
          }
          paramtb.q().a(localw1.a(), ((a.d.w)localObject1).b);
        }
      }
    }
    label1550:
    label1552:
    return bool1;
  }
  
  private static void c(tb paramtb)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    a.d.w localw = paramtb.c();
    if ((bool2) || (!Double.isNaN(localw.a())))
    {
      if (bool2) {
        break label61;
      }
      if (!Double.isNaN(localw.b())) {}
    }
    else
    {
      paramtb.a(a.d.w.c);
    }
    if (!bool2) {
      if (paramtb.n() > 0)
      {
        label61:
        localObject = paramtb.o();
        label121:
        do
        {
          if (!((fb)localObject).e()) {
            break;
          }
          eb localeb = ((fb)localObject).a();
          if (!bool2) {
            if (!Double.isNaN(localeb.b()))
            {
              if (bool2) {
                continue;
              }
              if (!Double.isNaN(localeb.c())) {
                break label121;
              }
            }
          }
          paramtb.a(localeb);
          ((fb)localObject).f();
        } while (!bool1);
      }
    }
    Object localObject = paramtb.d();
    if ((bool2) || ((Double.isNaN(((a.d.w)localObject).a())) || (Double.isNaN(((a.d.w)localObject).b())))) {
      paramtb.b(a.d.w.c);
    }
  }
  
  public static int b(tb paramtb, int paramInt)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if ((bool2) || ((paramtb.r() > 0) || ((!bool2) && (paramtb.i() == null)) || (paramtb.i().c() == null))) {
      return paramInt;
    }
    int i = 1;
    a.d.w localw2;
    do
    {
      if (i >= paramInt - 1) {
        break;
      }
      localw2 = a(paramtb, i);
      a.d.w localw3 = a(paramtb, i - 1);
      if (bool2) {
        break label122;
      }
      if (bool1) {
        break label121;
      }
      if (a(localw2, localw3))
      {
        paramtb.a(paramtb.b(i - 1));
        paramInt--;
        i--;
      }
      i++;
    } while (!bool1);
    label121:
    if ((!bool2) && (paramInt > 2))
    {
      label122:
      a.d.w localw1 = a(paramtb, paramInt - 1);
      localw2 = a(paramtb, paramInt - 2);
      if (bool2) {
        break label170;
      }
      if (a(localw1, localw2))
      {
        paramtb.a(paramtb.b(paramInt - 3));
        paramInt--;
      }
    }
    label170:
    return paramInt;
  }
  
  protected void a(eb parameb, double paramDouble1, double paramDouble2) {}
  
  protected void d(tb paramtb)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if ((bool2) || (paramtb.r() <= 0)) {
      if (!bool2)
      {
        if (paramtb.i() != null) {
          if (bool2) {
            break label51;
          }
        }
      }
      else {
        if (paramtb.i().c() != null) {
          break label50;
        }
      }
    }
    return;
    label50:
    label51:
    do
    {
      break;
      if (paramtb.n() <= 0) {
        break;
      }
      if (bool1) {
        break label101;
      }
      if (!a(a(paramtb, 0), a(paramtb, 1))) {
        break;
      }
      paramtb.a(paramtb.p());
    } while (!bool1);
    label101:
    do
    {
      break label142;
      if (bool2) {
        break label51;
      }
      if (paramtb.n() > 0)
      {
        if (bool1) {
          break label153;
        }
        if (a(a(paramtb, paramtb.n()), a(paramtb, paramtb.n() + 1)))
        {
          paramtb.a(paramtb.q());
          if (!bool1) {
            break;
          }
        }
      }
    } while (bool2);
    label142:
    label153:
    int i = 1;
    do
    {
      if (i >= paramtb.n()) {
        break;
      }
      a.d.w localw1 = a(paramtb, i);
      a.d.w localw2 = a(paramtb, i + 1);
      if (!bool2)
      {
        if (a(localw1, localw2))
        {
          paramtb.a(paramtb.b(i));
          paramtb.a(paramtb.b(i - 1));
          i--;
        }
        i++;
      }
    } while (!bool1);
  }
  
  static void a(g paramg, Collection paramCollection)
  {
    boolean bool = ld.D;
    Iterator localIterator = paramCollection.iterator();
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      d locald = (d)localIterator.next();
      e(paramg.t(locald));
    } while (!bool);
  }
  
  static void e(tb paramtb)
  {
    boolean bool = ld.E;
    g localg = paramtb.j();
    if (((bool) || (paramtb.n() > 0)) && ((bool) || (paramtb.i() != null)) && ((bool) || (paramtb.i().c() != null)))
    {
      d locald = paramtb.i();
      ld localld1 = paramtb.h();
      while (paramtb.n() > paramtb.r())
      {
        if (bool) {
          break label126;
        }
        if (localld1.f(paramtb.p().b(), paramtb.p().c()))
        {
          localg.c(locald, paramtb.p().e());
          if (paramtb.a(paramtb.p()) == null) {
            break;
          }
        }
      }
      label126:
      ld localld2 = paramtb.g();
      while ((paramtb.n() > paramtb.r()) && (localld2.f(paramtb.q().b(), paramtb.q().c())))
      {
        localg.d(locald, paramtb.q().e());
        if (null == paramtb.a(paramtb.q())) {
          break;
        }
      }
    }
  }
  
  private static boolean a(a.d.w paramw1, a.d.w paramw2)
  {
    boolean bool = ld.E;
    if ((bool) || (paramw1 != paramw2))
    {
      if ((!bool) && (Double.compare(paramw1.a(), paramw2.a()) != 0)) {
        break label53;
      }
      if (bool) {
        break label50;
      }
    }
    label50:
    label53:
    return Double.compare(paramw1.b(), paramw2.b()) == 0;
  }
  
  private static final class h_
  {
    final cg.g_ a;
    final cg.g_ b;
    private boolean d;
    
    h_(a.d.w paramw, double paramDouble1, double paramDouble2)
    {
      this.a = new cg.g_(this, paramw.a(), paramDouble1);
      this.b = new cg.g_(this, paramw.b(), paramDouble2);
      this.d = true;
    }
    
    boolean a()
    {
      return this.d;
    }
    
    void c()
    {
      this.d = false;
    }
    
    void a(double paramDouble1, double paramDouble2, byte paramByte)
    {
      boolean bool = ld.E;
      if (!bool) {}
      switch (paramByte)
      {
      case 0: 
        if (!bool)
        {
          this.b.c(paramDouble2);
          if (!ld.D) {
            return;
          }
        }
      case 1: 
        this.a.c(paramDouble1);
      }
    }
  }
  
  private static final class g_
  {
    final cg.h_ a;
    final double c;
    final double d;
    private double f;
    private boolean g;
    
    g_(cg.h_ paramh_, double paramDouble1, double paramDouble2)
    {
      this.a = paramh_;
      this.c = paramDouble1;
      this.f = paramDouble2;
      this.d = (paramDouble2 - paramDouble1);
    }
    
    double a()
    {
      return this.f;
    }
    
    double a(double paramDouble)
    {
      boolean bool = ld.E;
      if (!bool)
      {
        if (paramDouble < 0.0D)
        {
          if (bool) {
            break label59;
          }
          if (this.d > 0.0D) {}
        }
        else
        {
          if (bool) {
            break label76;
          }
        }
      }
      else
      {
        if (paramDouble <= 0.0D) {
          break label71;
        }
        if (bool) {
          break label76;
        }
        if (this.d >= 0.0D) {
          break label71;
        }
      }
      label59:
      double d1;
      if (!bool)
      {
        d1 = this.c;
        if (!ld.D) {}
      }
      else
      {
        label71:
        label76:
        d1 = this.c + paramDouble;
      }
      return d1;
    }
    
    void c(double paramDouble)
    {
      boolean bool = ld.E;
      double d1 = a(paramDouble);
      if (!bool) {
        if (this.g)
        {
          if (!bool)
          {
            if (this.f == d1) {
              return;
            }
            this.a.c();
            if (bool) {}
          }
          else if (!ld.D)
          {
            return;
          }
        }
        else {
          this.f = d1;
        }
      }
      this.g = true;
    }
  }
  
  private static final class f_
    extends z.s_
  {
    private final jd f;
    
    f_(jd paramjd, zd paramzd, a.d.w paramw, byte paramByte)
    {
      super(paramw, paramByte);
      this.f = paramjd;
    }
    
    a.d.w c(double paramDouble1, double paramDouble2)
    {
      de localde = this.f.g().a();
      return localde.a(this.f, d(paramDouble1, paramDouble2));
    }
    
    boolean f()
    {
      return this.f != null;
    }
    
    public void b(double paramDouble1, double paramDouble2)
    {
      super.b(paramDouble1, paramDouble2);
      if ((ld.E) || (f())) {
        this.f.a(d(paramDouble1, paramDouble2));
      }
    }
    
    private ee d(double paramDouble1, double paramDouble2)
    {
      jd localjd = this.f;
      de localde = localjd.g().a();
      return localde.a(localjd.b(), new a.d.w(a(paramDouble1), c(paramDouble2)));
    }
  }
  
  private static class e_
  {
    private double a;
    private double b;
    private double c;
    private double d;
    
    public e_()
    {
      this(-1.797693134862316E+308D, 1.7976931348623157E+308D, -1.797693134862316E+308D, 1.7976931348623157E+308D);
    }
    
    public e_(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
    {
      this.a = paramDouble1;
      this.b = paramDouble2;
      this.c = paramDouble3;
      this.d = paramDouble4;
    }
    
    public double a()
    {
      return this.a;
    }
    
    public void a(double paramDouble)
    {
      this.a = paramDouble;
    }
    
    public double b()
    {
      return this.b;
    }
    
    public void b(double paramDouble)
    {
      this.b = paramDouble;
    }
    
    public double c()
    {
      return this.c;
    }
    
    public void c(double paramDouble)
    {
      this.c = paramDouble;
    }
    
    public double d()
    {
      return this.d;
    }
    
    public void d(double paramDouble)
    {
      this.d = paramDouble;
    }
    
    public void a(Point2D paramPoint2D)
    {
      boolean bool = ld.E;
      if (!bool) {
        if (paramPoint2D.getX() > b()) {
          paramPoint2D.setLocation(b(), paramPoint2D.getY());
        }
      }
      if (!bool) {
        if (paramPoint2D.getX() < a()) {
          paramPoint2D.setLocation(a(), paramPoint2D.getY());
        }
      }
      if (!bool) {
        if (paramPoint2D.getY() > d()) {
          paramPoint2D.setLocation(paramPoint2D.getX(), d());
        }
      }
      if ((bool) || (paramPoint2D.getY() < c())) {
        paramPoint2D.setLocation(paramPoint2D.getX(), c());
      }
    }
    
    public void e(double paramDouble)
    {
      c(paramDouble);
      d(paramDouble);
    }
    
    public void f(double paramDouble)
    {
      a(paramDouble);
      b(paramDouble);
    }
    
    boolean a(double paramDouble1, double paramDouble2)
    {
      boolean bool = ld.E;
      if (((bool) || (a() <= paramDouble1)) && ((bool) || (paramDouble1 <= b())) && ((bool) || (c() <= paramDouble2))) {
        if (bool) {}
      }
      return paramDouble2 <= d();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.cg

 * JD-Core Version:    0.7.0.1

 */